var $;
var table;
var layer;
layui.use(['jquery','table','layer'],function() {
    $ = layui.jquery;
    table = layui.table;
    layer = layui.layer;
});
$.ajax({
    url:'/Product/queryCourseRecord',
    dataType:'json',
    data:{"id":$('#proId',window.parent.document).val()},
    success:function (data) {
        tab(data.data);
    }
});
function tab(data) {
    table.render({
        elem: '#demo' ,
        data:data,
        page:true,
        cols:[[
            {field:'implementDate',title:'审核时间',align:'center'},
            {field:'trueName',title:'审核人员',align:'center'},
            {field:'result',title:'审核结果',align:'center',templet:function(data){
                    var result;
                    if(data.result == 1){
                        result = "审核通过";
                    }else if(data.result == 2){
                        result = "待审核";
                    }else{
                        result = "审核驳回";
                    }
                    return "<div>"+result+"</div>";
                }},
            {field:'remarks',title:'反馈详情',align:'center'},
        ]]
    });
}